<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="../代码/01-react基础/lib/react.development.js"></script>
    <script src="../代码/01-react基础/lib/react-dom.development.js"></script>
    <script src="../代码/01-react基础/lib/babel.min.js"></script>
    <title>Document</title>
</head>

<body>
    <div id="root"></div>
</body>
<script type="text/babel">
    const root = ReactDOM.createRoot(document.getElementById('root'))

    function click1(e) {
        console.log("this指向", this);
        console.log("e.target", e);

    }

    root.render((
        <div>
            <button onClick={click1}>点击我触发react事件</button>
        </div>
    ))
</script>

</html>